.class public Lcom/example/m6shop/FindblueActivity;
.super Landroid/app/Activity;
.source "FindblueActivity.java"


# static fields
.field private static final SPP_UUID:Ljava/util/UUID;

.field private static mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

.field static mOutputStream:Ljava/io/OutputStream;


# instance fields
.field private back:Landroid/widget/ImageView;

.field private bluecount:Landroid/widget/TextView;

.field private blueprint:Landroid/widget/ListView;

.field private dialog:Landroid/app/AlertDialog$Builder;

.field private find:Landroid/widget/TextView;

.field m:Lmyapp/MyApp;

.field private mArrayAdapter:Landroid/widget/ArrayAdapter;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/widget/ArrayAdapter",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

.field private mBluetoothDevice:Landroid/bluetooth/BluetoothDevice;

.field private mpairedDeviceList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field pairedDevices:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Landroid/bluetooth/BluetoothDevice;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 46
    sput-object v0, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    .line 47
    sput-object v0, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    .line 51
    const-string v0, "00001101-0000-1000-8000-00805F9B34FB"

    invoke-static {v0}, Ljava/util/UUID;->fromString(Ljava/lang/String;)Ljava/util/UUID;

    move-result-object v0

    sput-object v0, Lcom/example/m6shop/FindblueActivity;->SPP_UUID:Ljava/util/UUID;

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 35
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 36
    iput-object v1, p0, Lcom/example/m6shop/FindblueActivity;->m:Lmyapp/MyApp;

    .line 41
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    .line 44
    iput-object v1, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    .line 45
    iput-object v1, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothDevice:Landroid/bluetooth/BluetoothDevice;

    .line 53
    iput-object v1, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    .line 55
    iput-object v1, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    .line 35
    return-void
.end method

.method static synthetic access$0(Lcom/example/m6shop/FindblueActivity;)Ljava/util/List;
    .locals 1

    .prologue
    .line 41
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$1(Lcom/example/m6shop/FindblueActivity;)Landroid/bluetooth/BluetoothAdapter;
    .locals 1

    .prologue
    .line 44
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    return-object v0
.end method

.method static synthetic access$2(Lcom/example/m6shop/FindblueActivity;Landroid/bluetooth/BluetoothDevice;)V
    .locals 0

    .prologue
    .line 45
    iput-object p1, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothDevice:Landroid/bluetooth/BluetoothDevice;

    return-void
.end method

.method static synthetic access$3(Lcom/example/m6shop/FindblueActivity;)Landroid/bluetooth/BluetoothDevice;
    .locals 1

    .prologue
    .line 45
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothDevice:Landroid/bluetooth/BluetoothDevice;

    return-object v0
.end method

.method static synthetic access$4()Ljava/util/UUID;
    .locals 1

    .prologue
    .line 51
    sget-object v0, Lcom/example/m6shop/FindblueActivity;->SPP_UUID:Ljava/util/UUID;

    return-object v0
.end method

.method static synthetic access$5(Landroid/bluetooth/BluetoothSocket;)V
    .locals 0

    .prologue
    .line 46
    sput-object p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    return-void
.end method

.method static synthetic access$6()Landroid/bluetooth/BluetoothSocket;
    .locals 1

    .prologue
    .line 46
    sget-object v0, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    return-object v0
.end method

.method public static print(Ljava/lang/String;)V
    .locals 4
    .param p0, "content"    # Ljava/lang/String;

    .prologue
    .line 172
    :try_start_0
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothSocket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v1

    sput-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    .line 178
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1c

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 179
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x21

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 180
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/4 v2, 0x4

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 182
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const-string v3, "GBK"

    invoke-virtual {v2, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 184
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 191
    :goto_0
    return-void

    .line 185
    :catch_0
    move-exception v0

    .line 187
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public static print2()V
    .locals 3

    .prologue
    .line 240
    :try_start_0
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1d

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 241
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x68

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 242
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x78

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 243
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1d

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 244
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x48

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 245
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 246
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1d

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 247
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x6b

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 248
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 249
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const-string v2, "091955826335"

    invoke-virtual {v2}, Ljava/lang/String;->getBytes()[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 250
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 251
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const-string v2, "\n"

    invoke-virtual {v2}, Ljava/lang/String;->getBytes()[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 258
    .local v0, "e":Ljava/lang/Exception;
    :goto_0
    return-void

    .line 252
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_0
    move-exception v0

    .line 254
    .restart local v0    # "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public static print3(Ljava/lang/String;)V
    .locals 4
    .param p0, "content"    # Ljava/lang/String;

    .prologue
    .line 214
    :try_start_0
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothSocket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v1

    sput-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    .line 220
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1b

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 221
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x40

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 222
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const-string v2, "\n"

    const-string v3, "GBK"

    invoke-virtual {v2, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 223
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const-string v3, "GBK"

    invoke-virtual {v2, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 224
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const-string v2, "\n"

    const-string v3, "GBK"

    invoke-virtual {v2, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 225
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const-string v2, "\n"

    const-string v3, "GBK"

    invoke-virtual {v2, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write([B)V

    .line 226
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 233
    :goto_0
    return-void

    .line 227
    :catch_0
    move-exception v0

    .line 229
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public static printcut()V
    .locals 3

    .prologue
    .line 195
    :try_start_0
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mBluetoothSocket:Landroid/bluetooth/BluetoothSocket;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothSocket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v1

    sput-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    .line 198
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x1b

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 199
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x64

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 200
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    const/16 v2, 0x64

    invoke-virtual {v1, v2}, Ljava/io/OutputStream;->write(I)V

    .line 203
    sget-object v1, Lcom/example/m6shop/FindblueActivity;->mOutputStream:Ljava/io/OutputStream;

    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 210
    .local v0, "e":Ljava/lang/Exception;
    :goto_0
    return-void

    .line 204
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_0
    move-exception v0

    .line 206
    .restart local v0    # "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method


# virtual methods
.method public init()V
    .locals 1

    .prologue
    .line 163
    const v0, 0x7f070107

    invoke-virtual {p0, v0}, Lcom/example/m6shop/FindblueActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->bluecount:Landroid/widget/TextView;

    .line 164
    const v0, 0x7f070106

    invoke-virtual {p0, v0}, Lcom/example/m6shop/FindblueActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->find:Landroid/widget/TextView;

    .line 165
    const v0, 0x7f070108

    invoke-virtual {p0, v0}, Lcom/example/m6shop/FindblueActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->blueprint:Landroid/widget/ListView;

    .line 166
    const v0, 0x7f0700cb

    invoke-virtual {p0, v0}, Lcom/example/m6shop/FindblueActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->back:Landroid/widget/ImageView;

    .line 167
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 8
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    const/4 v7, 0x1

    .line 60
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 61
    const v4, 0x7f030029

    invoke-virtual {p0, v4}, Lcom/example/m6shop/FindblueActivity;->setContentView(I)V

    .line 62
    invoke-virtual {p0}, Lcom/example/m6shop/FindblueActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v4

    check-cast v4, Lmyapp/MyApp;

    iput-object v4, p0, Lcom/example/m6shop/FindblueActivity;->m:Lmyapp/MyApp;

    .line 63
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v4}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v0

    .line 64
    .local v0, "activityList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/app/Activity;>;"
    invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 66
    invoke-virtual {p0}, Lcom/example/m6shop/FindblueActivity;->init()V

    .line 68
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->back:Landroid/widget/ImageView;

    new-instance v5, Lcom/example/m6shop/FindblueActivity$1;

    invoke-direct {v5, p0}, Lcom/example/m6shop/FindblueActivity$1;-><init>(Lcom/example/m6shop/FindblueActivity;)V

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 76
    new-instance v4, Landroid/app/AlertDialog$Builder;

    invoke-direct {v4, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    iput-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    .line 77
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    const-string v5, "XPrinter hint:"

    invoke-virtual {v4, v5}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 78
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    const-string v5, "\u84dd\u7259\u6ca1\u6709\u6253\u5f00\uff0c\u6216\u6ca1\u6709\u914d\u5bf9\u8bbe\u5907\n\u662f\u5426\u5728\u8bbe\u5b9a\u754c\u9762\u4e2d\u6253\u5f00\uff1f"

    invoke-virtual {v4, v5}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 79
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    const-string v5, "Yes"

    new-instance v6, Lcom/example/m6shop/FindblueActivity$2;

    invoke-direct {v6, p0}, Lcom/example/m6shop/FindblueActivity$2;-><init>(Lcom/example/m6shop/FindblueActivity;)V

    invoke-virtual {v4, v5, v6}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 89
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    const-string v5, "No"

    new-instance v6, Lcom/example/m6shop/FindblueActivity$3;

    invoke-direct {v6, p0}, Lcom/example/m6shop/FindblueActivity$3;-><init>(Lcom/example/m6shop/FindblueActivity;)V

    invoke-virtual {v4, v5, v6}, Landroid/app/AlertDialog$Builder;->setNeutralButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 99
    invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;

    move-result-object v4

    iput-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    .line 101
    :try_start_0
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v4, :cond_1

    .line 102
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->bluecount:Landroid/widget/TextView;

    const-string v5, "\u672a\u53d1\u73b0\u84dd\u7259\u8bbe\u5907"

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 130
    :cond_0
    :goto_0
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->bluecount:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "\u53d1\u73b0"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v6, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\u53f0\u84dd\u7259\u8bbe\u5907"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 131
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->find:Landroid/widget/TextView;

    const-string v5, "\u67e5\u627e\u5b8c\u6bd5"

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 132
    new-instance v4, Landroid/widget/ArrayAdapter;

    const v5, 0x1090003

    iget-object v6, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-direct {v4, p0, v5, v6}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    iput-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mArrayAdapter:Landroid/widget/ArrayAdapter;

    .line 133
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->blueprint:Landroid/widget/ListView;

    iget-object v5, p0, Lcom/example/m6shop/FindblueActivity;->mArrayAdapter:Landroid/widget/ArrayAdapter;

    invoke-virtual {v4, v5}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 135
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->blueprint:Landroid/widget/ListView;

    new-instance v5, Lcom/example/m6shop/FindblueActivity$4;

    invoke-direct {v5, p0}, Lcom/example/m6shop/FindblueActivity$4;-><init>(Lcom/example/m6shop/FindblueActivity;)V

    invoke-virtual {v4, v5}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 161
    return-void

    .line 105
    :cond_1
    :try_start_1
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v4}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v4

    if-eqz v4, :cond_4

    .line 106
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v4}, Landroid/bluetooth/BluetoothAdapter;->getName()Ljava/lang/String;

    move-result-object v3

    .line 107
    .local v3, "getName":Ljava/lang/String;
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v4}, Landroid/bluetooth/BluetoothAdapter;->getBondedDevices()Ljava/util/Set;

    move-result-object v4

    iput-object v4, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    .line 108
    :goto_1
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    if-gt v4, v7, :cond_3

    .line 111
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    invoke-interface {v4}, Ljava/util/Set;->size()I

    move-result v4

    if-nez v4, :cond_2

    .line 112
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    invoke-virtual {v4}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v4

    invoke-virtual {v4}, Landroid/app/AlertDialog;->show()V

    .line 114
    :cond_2
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_2
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_0

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/bluetooth/BluetoothDevice;

    .line 116
    .local v1, "device":Landroid/bluetooth/BluetoothDevice;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothDevice;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "#"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v1}, Landroid/bluetooth/BluetoothDevice;->getAddress()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 117
    iget-object v5, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-interface {v5, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    .line 125
    .end local v1    # "device":Landroid/bluetooth/BluetoothDevice;
    .end local v3    # "getName":Ljava/lang/String;
    :catch_0
    move-exception v2

    .line 127
    .local v2, "e":Ljava/lang/Exception;
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->bluecount:Landroid/widget/TextView;

    invoke-virtual {v2}, Ljava/lang/Exception;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    .line 109
    .end local v2    # "e":Ljava/lang/Exception;
    .restart local v3    # "getName":Ljava/lang/String;
    :cond_3
    :try_start_2
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    const/4 v5, 0x1

    invoke-interface {v4, v5}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    goto :goto_1

    .line 122
    .end local v3    # "getName":Ljava/lang/String;
    :cond_4
    iget-object v4, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    invoke-virtual {v4}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v4

    invoke-virtual {v4}, Landroid/app/AlertDialog;->show()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto/16 :goto_0
.end method

.method public text()I
    .locals 2

    .prologue
    .line 262
    invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    .line 264
    :try_start_0
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    if-nez v0, :cond_0

    .line 265
    const/4 v0, 0x0

    .line 289
    :goto_0
    return v0

    .line 268
    :cond_0
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->isEnabled()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 270
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter;

    invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getBondedDevices()Ljava/util/Set;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    .line 271
    :cond_1
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v1, 0x1

    if-gt v0, v1, :cond_1

    .line 276
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->pairedDevices:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->size()I

    move-result v0

    if-nez v0, :cond_2

    .line 277
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 289
    :cond_2
    :goto_1
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->mpairedDeviceList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    goto :goto_0

    .line 283
    :cond_3
    :try_start_1
    iget-object v0, p0, Lcom/example/m6shop/FindblueActivity;->dialog:Landroid/app/AlertDialog$Builder;

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    .line 286
    :catch_0
    move-exception v0

    goto :goto_1
.end method
